<template>
           <el-form style="max-width: 600px" :model="ruleForm" label-width="auto" class="demo-ruleForm" :size="formSize"
            status-icon>
         
            <el-form-item label="客户姓名">
                <el-input v-model="ruleForm.truename" placeholder="房号" />
            </el-form-item>
            <el-form-item label="客户手机号">
                <el-input v-model="ruleForm.Phone" placeholder="客户手机号" />
              
            </el-form-item>
            <el-form-item label="入住时间">
                <el-input v-model="ruleForm.CheckTime" placeholder="入住时间" />
            </el-form-item>
            <el-form-item label="离店时间">
                <el-input v-model="ruleForm.DepartureTime" placeholder="离店时间" />
            </el-form-item>
            <el-form-item>
                
            </el-form-item>
        </el-form>
  </template>
<script lang="ts" setup>
import axios from 'axios';

import { onMounted, reactive } from 'vue'
//axios.defaults.baseURL = 'http://10.31.59.9:9033/api/';//设置请求的根路径
// do not use same name with ref
const ruleForm = reactive<RuleForm>({
    truename:'',
    Phone:'',
    CheckTime:'',
    DepartureTime:''

})
interface RuleForm {
    truename: string;
    Phone: string;
    CheckTime: string;
    DepartureTime: string;
}
function Find()
{
    axios.get(`http:localhost:5003/api/ClientcuStomer/ClientcuStomersFind?id=${route.params.aaid}`).then(res=>{

        ruleForm.truename=res.data.truename;
        ruleForm.Phone=res.data.Phone;
        ruleForm.CheckTime=res.data.CheckTime;
        ruleForm.DepartureTime=res.data.DepartureTime;
     
    })
}
const onSubmit = () => {
    console.log('submit!')
}
onMounted(() => {
    Find()
})
</script>